// 读取api.json并
const fs = require("fs");
const allNames = require("../docs/allName.json");
const bjName = require("./war3/blizzard.json");
const cjName = require("./war3/common.json")
const aiName = require("./war3/commonai.json")
const japiName = require("./japi.json")

let restNames = [];

console.log(
    allNames.length,
    bjName.length,
    cjName.length,
    aiName.length,
    japiName.length,
    allNames.length- bjName.length - cjName.length-aiName.length-japiName.length,
)

allNames.forEach(n => {
    if(bjName.indexOf(n) == -1 
    && cjName.indexOf(n) == -1
    && aiName.indexOf(n) == -1
    && japiName.indexOf(n) == -1){
        restNames.push(n)
    }
})

console.log(restNames.length)

fs.writeFileSync("restName.json",JSON.stringify(restNames));